package com.walle.concurrenttest.pattern.activeobject;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.activeobject
 * @Description: ${todo}
 * @date 2019/2/27 15:41
 */
public class MakeStringRequest extends MethodRequest  {

    private final int count;

    private final char fillChar;

    public MakeStringRequest(Servant servant, FutureResult future, int count, char fillChar) {
        super(servant, future);
        this.count = count;
        this.fillChar = fillChar;
    }

    @Override
    public void execute() {
        Result result = servant.makeString(count,fillChar);
        future.setResult(result);
    }
}
